//
//  BookingController.h
//  NZTaxi
//
//  Created by Allan Vergara on 17/09/10.
//  Copyright 2010 List-it. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PickupTVC.h"
#import "TravelDateTVC.h"
#import "TaxiShareTVC.h"
#import "TaxiCoyTVC.h"
#import "TaxiCompany.h"
#import "Address.h"
#import "TextFieldTVC.h"

// settings
extern NSString * const C_TAXI_COY_SETTING;
extern NSString * const C_NOTIFY_ADDRESS_CHANGE;

typedef enum 
{
	atPickup,
	atDropoff
} AddressType;

@interface BookingController : UITableViewController <UIActionSheetDelegate, UIPickerViewDelegate, UIPickerViewDataSource, UITextFieldDelegate> {	
    NSMutableArray *vehicleTypes;
    NSString* selectedVehicle;
	Address *pickupAddress;
	Address *destinationAddress;
	AddressType selectedAddressType;
	NSString *tempDateSelection;
	NSMutableData *responseData;
    UIPickerView *taxiPicker;
}

@property(nonatomic, retain) Address *pickupAddress;
@property(nonatomic, retain) Address *destinationAddress;
@property(nonatomic, retain) NSString *tempDateSelection;
@property(nonatomic, retain) NSMutableData *responseData;
@property(nonatomic, retain) TextFieldTVC *instructionCell;

-(IBAction)btnDoneClick:(id)sender;
-(void)btnBookItClicked;
-(void)showTaxiCoyPicker;
-(void)showTaxiTypePicker;
-(void)showDatePicker;
-(void)AddressChanged:(NSNotification *)notification;
-(void)ResetFields;
-(UIImage *)getSelectedImage:(NSString *)imageSource;

// TextField delegate tasks
- (BOOL)textFieldShouldReturn:(UITextField *)textField;
- (void)textFieldDidEndEditing:(UITextField *)textField;
@end

